/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "productDetail")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ProductDetail.findAll", query = "SELECT p FROM ProductDetail p"),
    @NamedQuery(name = "ProductDetail.findByPdId", query = "SELECT p FROM ProductDetail p WHERE p.pdId = :pdId"),
    @NamedQuery(name = "ProductDetail.findByProId", query = "SELECT p FROM ProductDetail p WHERE p.proId = :proId"),
    @NamedQuery(name = "ProductDetail.findByProTimeStamp", query = "SELECT p FROM ProductDetail p WHERE p.proTimeStamp = :proTimeStamp"),
    @NamedQuery(name = "ProductDetail.findByValue", query = "SELECT p FROM ProductDetail p WHERE p.value = :value")})
public class ProductDetail implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pdId")
    private Integer pdId;
    @Column(name = "proId")
    private Integer proId;
    @Column(name = "proTimeStamp")
    private BigInteger proTimeStamp;
    @Column(name = "value")
    private Integer value;

    public ProductDetail() {
    }

    public ProductDetail(Integer pdId) {
        this.pdId = pdId;
    }

    public Integer getPdId() {
        return pdId;
    }

    public void setPdId(Integer pdId) {
        this.pdId = pdId;
    }

    public Integer getProId() {
        return proId;
    }

    public void setProId(Integer proId) {
        this.proId = proId;
    }

    public BigInteger getProTimeStamp() {
        return proTimeStamp;
    }

    public void setProTimeStamp(BigInteger proTimeStamp) {
        this.proTimeStamp = proTimeStamp;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pdId != null ? pdId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProductDetail)) {
            return false;
        }
        ProductDetail other = (ProductDetail) object;
        if ((this.pdId == null && other.pdId != null) || (this.pdId != null && !this.pdId.equals(other.pdId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bean.ProductDetail[ pdId=" + pdId + " ]";
    }
    
}
